package cn.bugstack.springframework.beans.factory;

import cn.bugstack.springframework.beans.BeansException;

import java.util.Map;

/**
 * @author ouyangzhao
 */
public interface ListableBeanFactory extends BeanFactory{

    /**
     * 按照类型返回Bean实例
     * @param beanType
     * @return
     * @param <T>
     */
    <T> Map<String, T> getBeansOfType(Class<T> beanType) throws BeansException;

    /**
     * 返回所有Bean实例的名称
     * @return
     */
    String [] getBeanDefinitionNames();

}
